/*
 *  Licensed to the Apache Software Foundation (ASF) under one or more
 *  contributor license agreements.  See the NOTICE file distributed with
 *  this work for additional information regarding copyright ownership.
 *  The ASF licenses this file to You under the Apache License, Version 2.0
 *  (the "License"); you may not use this file except in compliance with
 *  the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
/**
 * @author Ilya S. Okomin
 */
package org.apache.harmony.awt.nativebridge.linux;


import org.apache.harmony.awt.nativebridge.*;


/**
 * This file has been generated by a program.
 *
 *
 */
public class LinuxNativeFontWrapper extends BasicLibWrapper {
    static LinuxNativeFontWrapper instance;

    public static final byte FT_CURVE_TAG_ON = 1;
    public static final byte FT_CURVE_TAG_CONIC = 0;
    public static final byte FT_CURVE_TAG_CUBIC = 2;

    public static synchronized LinuxNativeFontWrapper getInstance() {
        if (instance == null) {
            instance = new LinuxNativeFontWrapper();
        }
        return instance;
    }

    private LinuxNativeFontWrapper() {
    }

    public static class GlyphBitmap extends CommonStructWrapper {

        public static final int sizeof = NativeBridge.is64 ? 48 : 32;

        GlyphBitmap(boolean direct) {
            super(sizeof, direct);
        }
        GlyphBitmap(VoidPointer base) {
            super(base);
        }
        GlyphBitmap(long addr) {
            super(addr);
        }
        public final void set_left(int val) {
            byteBase.setInt32(0, val);
        }
        public final int get_left() {
            return byteBase.getInt32(0);
        }
        public final void set_top(int val) {
            byteBase.setInt32(4, val);
        }
        public final int get_top() {
            return byteBase.getInt32(4);
        }
        public final Xft.FT_Bitmap get_bitmap() {
            return Xft.instance.createFT_Bitmap(getElementPointer(8));
        }
        public int size() {
            return sizeof;
        }
    }

    public final GlyphBitmap createGlyphBitmap(boolean direct) {
        return new GlyphBitmap(direct);
    }
    public final GlyphBitmap createGlyphBitmap(VoidPointer base) {
        return new GlyphBitmap(base);
    }
    public final GlyphBitmap createGlyphBitmap(long addr) {
        return new GlyphBitmap(addr);
    }
}

